<%@ page language="java" import="java.util.*" pageEncoding="ISO-8859-1"%>

<%@ page session="true"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%

 if(session.getAttribute("user")==null){
 
   RequestDispatcher rd=request.getRequestDispatcher("/jsps/LoginForm.jsp");
  rd.forward(request,response);
   
 %>
 <%} %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>

<script language="JavaScript" src="<%=request.getContextPath()+"/js/gen_validatorv31.js"%>" type="text/javascript"></script>




</head>
  
  <body >
  
 
  <jsp:include page="Header.jsp"></jsp:include>
   <br/>
 
  <center><b><h4>StateUpdate Form</h4></b></center>
   
	
		<form action="./UpdateStateAction" method="post" name="login">
		


         <table cellspacing=2 align="center" bgcolor="ashblue" width="325" height="60">
		         
		           <c:if test="${not empty StatesInfo}">
		          
		          
				<tr><td align='right'><b>StateID :</b><br></td><td> <input type=text name="stateid"  value="${StatesInfo.stateid }"     readonly="readonly"/>
				<br><tr><td align='right'><b>State Name :</b><br></td><td> <input type=text name="sname"  value="${StatesInfo.sname }"   />
				<br></td><td><br></td></tr>

				</c:if>
				<tr><td align='right'><input type=submit value="UPDATE" /><br></td><td>&nbsp;<input type=submit value=cancel /><br></td></tr>
			
	    </table>



   </form>
   <script language="JavaScript" type="text/javascript">
//You should create the validator only after the definition of the HTML form
  var frmvalidator  = new Validator("login");

  frmvalidator.addValidation("sname","req","State Name is required");
    frmvalidator.addValidation("sname","alpha","State Name is Only Characters");
    
    </script>
   
   <br/>
     <jsp:include page="Footer.jsp"></jsp:include>
  </body>
</html>
